package src.com.qf.controller;

import com.alibaba.fastjson.JSON;
import src.com.qf.entity.GoodType;
import src.com.qf.service.GoodTypeService;
import src.com.qf.service.impl.GoodTypeServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@WebServlet("/goodType")
public class GoodTypeController extends BaseController {
    GoodTypeService service = new GoodTypeServiceImpl();
    public String goodTypeAjax(HttpServletRequest request, HttpServletResponse response){
        List<GoodType> list =  service.goodTypeAjax();
        String s = JSON.toJSONString(list);
        return s;
    }
}
